import request from "@/utils/request.js";

// 获取警务区状况图
export const getPoliceSituationApi = (id) => {
    return request({
        method: 'post',
        url: '/bussiness/policearea/stateView',
        params: {
            unitId: id
        },
        isEncrypt: false
    })
}

// 警务区状况 · 开始
export const startPoliceSituationApi = (id) => {
    return request({
        method: 'post',
        url: '/bussiness/Schedule/onDuty',
        params: {
            policeAreaId: id
        },
        isEncrypt: false
    })
}
// 警务区状况 · 结束
export const endPoliceSituationApi = (id, remark) => {
    return request({
        method: 'post',
        url: '/bussiness/Schedule/offDuty',
        params: {
            policeAreaId: id
        },
        data: remark,
        isEncrypt: false
    })
}

// 获取当前值班人员信息
export const getCurrentPoliceUserApi = (id) => {
    return request({
        method: 'post',
        url: '/bussiness/Schedule/getOnDutyUsers',
        params: {
            policeAreaId: id
        },
        isEncrypt: false
    })
}

// 获取非执勤出警人员列表
export const getOnDutyPoliceList = (unitId) => {
    return request({
        method: 'post',
        url: '/bussiness/policearea/onDutyPoliceList',
        params: {
            unitId: unitId
        },
        isEncrypt: false
    })
}
